package com.core.entity.params;

import java.util.HashMap;
import java.util.Map;

import com.lidroid.xutils.http.RequestParams;

public class MapParams extends Params {
	private Map<String, Object> logMap = new HashMap<>();

	@Override
	public void build() {// 指定编码
		reqParams
				.setContentType("application/x-www-form-urlencoded; charset=utf-8");
	}

	@Override
	public void put(String key, Object value) {
		reqParams.addBodyParameter(key, value + "");
		logMap.put(key, value);
	}

	@Override
	public RequestParams toValue() {
		return reqParams;
	}

	@Override
	public String toLog() {
		return logMap.toString();
	}

}
